<html>
  <head>
${agent = request.getHeader("User-Agent")}
    <g:if test="${agent =~ /Nintendo/}">
      <meta name="layout" content="core_ds"></meta>
    </g:if>
    <g:else>
      <meta name="layout" content="core"></meta>
    </g:else>
  </head>
  <body>
    <div id="leftpanels">
      <div id="panel" class="imagepanel">
        <h2>Image Panel</h2>
        <div id="robotimage"><applet codebase="${request.contextPath}/applets" code="com.charliemouse.cambozola.Viewer" archive="cambozola.jar" width="320" height="240" alt="Webcam">
            <param name="url" value="http://webrobot.test:8000/?action=stream"/>
            You need to install Java to use the webcam.
        </applet></div>
      </div>
      <div style="clear:both;"></div>
      <div id="panel" class="statuspanel">
        <h2>Status Panel</h2>
        <div id="statuses">
          <a onclick="connect();return false;" href="javascript:void();">Connect</a>
          <a onclick="disconnect();return false;" href="javascript:void();">Disconnect</a>
          <div id="messages"> </div>
        </div>
      </div>
    </div>


    <div id="rightpanels">
      <div id="panel" class="sensorpanel">
        <h2>Sensor Panel</h2>
        <div id="sensors">
          not connected to any robot
        </div>
      </div>
      <div id="panel" class="battery">
        <h2>Battery</h2>
        <div id="battery">
          <div id="battery_reading">N/A</div>
          <div id="battery_used" style="height:50%;">
          </div>
          <div id="battery_unused" style="height:50%;">
          </div>
        </div>
      </div>
      <div style="clear:both;"></div>
      <div id="panel" class="actionpanel">
        <h2>Action Panel</h2>
        <div id="actions">
          not connected to any robot
        </div>
      </div>
      <div style="clear:both;"></div>
      <div id="panel" class="macropanel">
        <h2>Macro Panel</h2>
        <div id="macros">
          not connected to any robot
        </div>
      </div>
      <div style="clear:both;"></div>
    </div>
    <div style="clear:both;"></div>
  </body>
</html>
